package com.um.jdy.mp.commission.manager;

import com.um.jdy.common.base.entity.po.Bank;
import com.um.jdy.common.base.entity.vo.BankVO;
import com.um.jdy.common.base.service.BankService;
import com.um.springboot.starter.orm.entity.Response;
import com.um.springboot.starter.orm.manager.BaseManager;
import com.um.springboot.starter.orm.params.ListParams;
import com.um.springboot.starter.utils.UMBeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class BankManager extends BaseManager<BankService> {

    public Response<List<BankVO>> list(ListParams params) {
        List<Bank> bankList = service.getAll();
        return Response.success(UMBeanUtils.copyBeanList(bankList, BankVO.class));
    }

}
